import java.util.Scanner;

public class char_numbers {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String str = sc.next();
        int lc = 0;
        int uc = 0;
        int nc = 0;
        int ec = 0;
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) >= 'a' && str.charAt(i) <= 'z') {
                lc++;
            }else if(str.charAt(i) >= 'A' && str.charAt(i) <= 'Z') {
                uc++;
            }else if(str.charAt(i) >= '0' && str.charAt(i) <= '9') {
                nc++;
            }else {
                ec++;
            }
        }
        System.out.println("lc = " + lc);
        System.out.println("uc = " + uc);
        System.out.println("nc = " + nc);
        System.out.println("ec = " + ec);

    }
}
